package cn.kgc.springboot.vue.controller;

import cn.kgc.springboot.vue.response.ResponseResult;
import cn.kgc.springboot.vue.service.MailService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 课工场
 * @date 2024/12/20
 * @description
 */
@RestController
@RequestMapping("mail")
public class MailController {

    @Resource
    private MailService mailService;

    @GetMapping("sendMessage/{to}")
    public ResponseResult sendMessage(@PathVariable String to){
        return  mailService.sendMessage(to);
    }

}
